import Axios from "./base";

// 获取所有角色
export const getRolesApi = () => Axios.get("/roles");

// 角色授权
export const setUserRolesApi = (roleId, rids) =>
  Axios.post(`/roles/${roleId}/rights`, { rids });

// 添加角色
export const addRole = (data) => Axios.post("/roles", data);

// 编辑角色
export const editRole = (id, data) => Axios.put("/roles/" + id, data);
